package com.settlement.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.settlement.system.common.annotation.StorePermission;
import com.settlement.system.model.entity.DyBill;
import com.settlement.system.model.query.DyBillPageQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 抖音账单 Mapper 接口
 * </p>
 *
 * @author huangrensen
 * @since 2023-08-05
 */
@Mapper
public interface DataMapper extends BaseMapper<DyBill> {

    /**
     * 通过数据表名查询数据，用Map封装
     * @param tableName
     * @return
     */
    Map<String, Object> getDataById(@Param("tableName")String tableName, @Param("id")String id);

    /**
     * 通过拼接sql查询数据，用Map封装
     * @param sql
     * @return
     */
    List<Map<String, Object>> getDataBySql(@Param("sql")String sql);

    /**
     * 是否存在表
     * @param tableName
     * @return
     */
    String existTable(@Param("tableName")String tableName);
}
